<?php
if(isset($_POST['name_domain']))
  $name = $_POST['name_domain'];
else $name = "";
?>
<script type="text/javascript">
  var name_check = "<?php echo $name;?>";
  if(name_check!="")
  {
    $(document).ready(function(){
      check();
    });
  }
</script>
<div class="width_1200">
  <div class="domainsearch">
    <form action="ten-mien.html" class="search" id="search-domain" method="POST">
      <input id="name_input" type="text" placeholder="Nhập tên miền cần tìm">
      <input id="submit" name="submit" type="button" value="Kiểm Tra Tên Miền" onClick="check()">
    </form>
		<div class="tb_kt extra-service tb_more" style="display:none">
			<ul id="name">
				<li><span class="name_domain"></span><span>.com</span></li>
				<li><span class="name_domain"></span><span>.net</span></li>
				<li><span class="name_domain"></span><span>.info</span></li>
				<li><span class="name_domain"></span><span>.org</span></li>
				<li><span class="name_domain"></span><span>.tv</span></li>
				<li><span class="name_domain"></span><span>.mobi</span></li>
				<li><span class="name_domain"></span><span>.vn</span></li>
				<li><span class="name_domain"></span><span>.com.vn</span></li>
				<li><span class="name_domain"></span><span>.net.vn</span></li>
				<li><span class="name_domain"></span><span>.info.vn</span></li>
				<li><span class="name_domain"></span><span>.edu.vn</span></li>
			</ul>
			<ul id="log_res">
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
				<li><img src="images/processing.gif"></li>
			</ul>
			<input style="margin: 10px 0 10px 685px;" type="button" name="submit" class="newsletter-button glow" id="submit_btn" value="ĐĂNG KÝ">
		</div>
		<div class="tb_kt extra-service tb_one" style="display:none">
			<ul id="name">
				<li><span class="name_domain"></span></li>
			</ul>
			<ul id="log_res">
				<li><img src="images/processing.gif"></li>
			</ul>
			<input style="margin: 10px 0 10px 685px;"  type="button" name="submit" class="newsletter-button glow" id="submit_btn" value="ĐĂNG KÝ">
		</div>
  </div>
 <script type="text/javascript">
	  function check() {
        var name;
        if(name_check!= "")
        {
          name = name_check;
        }
		   	else name = $("#name_input").val();
		   	var arr = name.split(".");
		   	if(arr[1] == null)
			{
				  $(".no_reg").empty();
		  		$(".reg").empty();
		  		$(".no_reg").html('<img src="images/processing.gif">');
		  		$(".reg").html('<img src="images/processing.gif">');
			  	$(".tb_more").css("display","table");
				$(".tb_one").css("display","none");
			   	$(".name_domain").html(arr[0]);
			   	$.ajax({
					 url:'libs/ajax.php',
					 type:'post',
					 data:"name="+name+"&action=whoiss",
					 success: function(data){
						$(".tb_more #log_res").html(data);
					  },
				   	 error: function (error) {
							alert(error);
			   			}
		    	 });
				 name_check = "";
			}
			else
			{
				$(".tb_one").css("display","table");
				$(".tb_more").css("display","none");
				$(".no_reg").empty();
		  		$(".reg").empty();
		  		$(".no_reg").html('<img src="images/processing.gif">');
		  		$(".reg").html('<img src="images/processing.gif">');
		  		$(".name_domain").html(name);
		  		$.ajax({
					 url:'libs/ajax.php',
					 type:'post',
					 data:"name="+name+"&action=whois",
					 success: function(data){
						$(".tb_one #log_res").html(data);
					  },
				   	 error: function (error) {
							alert(error);
			   			}
		    	 });
				 name_check = "";
			}
	}
</script>
  <div style="margin-top: 50px"></div>
  <div class="price-table left">
    <table class="price-list">
      <tbody>
        <tr>
          <th>Loại Tên Miền</th>
          <th>Phí Đăng Ký</th>
          <th>Phí Duy Trì</th>
          <th>Phí Chuyển Nhượng</th>
        </tr>
        <tr>
          <td>Tên miền cấp 2 .VN</td>
          <td>350.000 VNĐ</td>
          <td>480.000 VNĐ/năm</td>
          <td>------------</td>
        </tr>
        <tr>
          <td>Com.vn, net.vn, biz.vn</td>
          <td>350.000 VNĐ</td>
          <td>350.000 VNĐ/năm</td>
          <td>------------</td>
        </tr>
        <tr>
          <td>- Edu.vn, gov.vn, org.vn, ac.vn, info.vn, pro.vn, health.vn, int.vn <br>- Tên miền theo địa giới hành chính (tên địa danh, ví dụ: hanoi.vn)</td>
          <td>200.000 VNĐ</td>
          <td>200.000 VNĐ/năm</td>
          <td>------------</td>
        </tr>
        <tr>
          <td>Tên miền quốc tế</td>
          <td>0 VNĐ</td>
          <td>260.000 VNĐ/năm</td>
          <td>------------</td>
        </tr>
        <tr>
          <td>Phí chuyển DNS tên miền Việt Nam</td>
          <td>0 VNĐ</td>
          <td>------------</td>
          <td>------------</td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="domainfeatured left">
    <ul>
      <li>
        <div class="circle left"><i class="fa fa-repeat"></i></div>
        <div class="des left">
          <h3>API integration</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
      <li>
        <div class="circle left"><i class="fa fa-plus-circle"></i></div>
        <div class="des left">
          <h3>Add On</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
      <li>
        <div class="circle left"><i class="fa fa-list-alt"></i></div>
        <div class="des left">
          <h3>Control Panel</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
      <li>
        <div class="circle left"><i class="fa fa-cog"></i></div>
        <div class="des left">
          <h3>DNS</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
      <li>
        <div class="circle left"><i class="fa fa-lock"></i></div>
        <div class="des left">
          <h3>Locking</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
      <li>
        <div class="circle left"><i class="fa fa-usd"></i></div>
        <div class="des left">
          <h3>Resell</h3>
          <p>Tote bag Brooklyn Bushwick pour-over. Helvetica shabby chic vegan stumptown. Occaecat yr seitan forage. Typewriter lo-fi sartorial.</p>
        </div>
      </li>
    </ul>
  </div>
</div>
